﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;

namespace TMS
{
    public class Developer : Usuario
    {
        #region CONSTRUCTORES
        public Developer(long pNro, string pNombre, string pNick, string pPassword, string pMail)
            : base(pNro, pNombre, pNick, pPassword, pMail)
        { }
        public Developer()
            : base()
        { }
        #endregion

        #region METODOS
        public void newDeveloper() /* Agrega un nuevo Developer al documento XML*/
        {
            DeveloperXMLManager.getInstancia().addDeveloper(this); 
        }
        public void modDeveloper() /* Modifica los datos de un Developer ya agregado en el documento XML*/
        {
            DeveloperXMLManager.getInstancia().updateDeveloper(this);
        }
        public void remDeveloper() /* Elimina un Developer del documento XML*/
        {
            DeveloperXMLManager.getInstancia().removeByIdUsuario(this.NroUsuario);
        }
        public static Developer getDeveloperById(long pId)
        {
            return DeveloperXMLManager.getInstancia().getDeveloperById(pId);
        }
        public static long getLastId()
        {
            return DeveloperXMLManager.getInstancia().getUltimoId();
        }
        public static List<Developer> getDevList()
        {
            return DeveloperXMLManager.getInstancia().getDevList();
        }
        #endregion
    }
}